3.3.69 \(\int (a+b \sec (c+d x))^n \sin ^3(c+d x) \, dx\) [269]

Optimal. Leaf size=121 \[ \frac {b \left (6 a^2-b^2 \left (2-3 n+n^2\right )\right ) \, _2F_1\left (2,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{6 a^4 d (1+n)}+\frac {\cos ^3(c+d x) (a+b \sec (c+d x))^{1+n} (2 a-b (2-n) \sec (c+d x))}{6 a^2 d} \]

[Out]

1/6*b*(6*a^2-b^2*(n^2-3*n+2))*hypergeom([2, 1+n],[2+n],1+b*sec(d*x+c)/a)*(a+b*sec(d*x+c))^(1+n)/a^4/d/(1+n)+1/
6*cos(d*x+c)^3*(a+b*sec(d*x+c))^(1+n)*(2*a-b*(2-n)*sec(d*x+c))/a^2/d

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3959, 150, 67} \begin {gather*} \frac {\cos ^3(c+d x) (2 a-b (2-n) \sec (c+d x)) (a+b \sec (c+d x))^{n+1}}{6 a^2 d}+\frac {b \left (6 a^2-b^2 \left (n^2-3 n+2\right )\right ) (a+b \sec (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac {b \sec (c+d x)}{a}+1\right )}{6 a^4 d (n+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[c + d*x])^n*Sin[c + d*x]^3,x]

[Out]

(b*(6*a^2 - b^2*(2 - 3*n + n^2))*Hypergeometric2F1[2, 1 + n, 2 + n, 1 + (b*Sec[c + d*x])/a]*(a + b*Sec[c + d*x
])^(1 + n))/(6*a^4*d*(1 + n)) + (Cos[c + d*x]^3*(a + b*Sec[c + d*x])^(1 + n)*(2*a - b*(2 - n)*Sec[c + d*x]))/(
6*a^2*d)

Rule 67

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))
*Hypergeometric2F1[-m, n + 1, n + 2, 1 + d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Intege
rQ[m] || GtQ[-d/(b*c), 0])

Rule 150

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_))*((g_.) + (h_.)*(x_)), x_Symbol] :
> Simp[((b^3*c*e*g*(m + 2) - a^3*d*f*h*(n + 2) - a^2*b*(c*f*h*m - d*(f*g + e*h)*(m + n + 3)) - a*b^2*(c*(f*g +
 e*h) + d*e*g*(2*m + n + 4)) + b*(a^2*d*f*h*(m - n) - a*b*(2*c*f*h*(m + 1) - d*(f*g + e*h)*(n + 1)) + b^2*(c*(
f*g + e*h)*(m + 1) - d*e*g*(m + n + 2)))*x)/(b^2*(b*c - a*d)^2*(m + 1)*(m + 2)))*(a + b*x)^(m + 1)*(c + d*x)^(
n + 1), x] + Dist[f*(h/b^2) - (d*(m + n + 3)*(a^2*d*f*h*(m - n) - a*b*(2*c*f*h*(m + 1) - d*(f*g + e*h)*(n + 1)
) + b^2*(c*(f*g + e*h)*(m + 1) - d*e*g*(m + n + 2))))/(b^2*(b*c - a*d)^2*(m + 1)*(m + 2)), Int[(a + b*x)^(m +
2)*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] && (LtQ[m, -2] || (EqQ[m + n + 3, 0] &&  !L
tQ[n, -2]))

Rule 3959

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Dist[-f^(-1), Subs
t[Int[(-1 + x)^((p - 1)/2)*(1 + x)^((p - 1)/2)*((a + b*x)^m/x^(p + 1)), x], x, Csc[e + f*x]], x] /; FreeQ[{a,
b, e, f, m}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int (a+b \sec (c+d x))^n \sin ^3(c+d x) \, dx &=-\frac {\text {Subst}\left (\int \frac {(-1+x) (1+x) (a-b x)^n}{x^4} \, dx,x,-\sec (c+d x)\right )}{d}\\ &=\frac {\cos ^3(c+d x) (a+b \sec (c+d x))^{1+n} (2 a-b (2-n) \sec (c+d x))}{6 a^2 d}-\frac {\left (6-\frac {b^2 (1-n) (2-n)}{a^2}\right ) \text {Subst}\left (\int \frac {(a-b x)^n}{x^2} \, dx,x,-\sec (c+d x)\right )}{6 d}\\ &=\frac {b \left (6 a^2-b^2 \left (2-3 n+n^2\right )\right ) \, _2F_1\left (2,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{6 a^4 d (1+n)}+\frac {\cos ^3(c+d x) (a+b \sec (c+d x))^{1+n} (2 a-b (2-n) \sec (c+d x))}{6 a^2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.21, size = 155, normalized size = 1.28 \begin {gather*} \frac {\cos (c+d x) \left (-\frac {2 (2 a-b (-2+n)) (b+a \cos (c+d x))^2}{a}+8 \cos ^2\left (\frac {1}{2} (c+d x)\right ) (b+a \cos (c+d x))^2-\frac {2 b \left (-6 a^2+b^2 \left (2-3 n+n^2\right )\right ) \, _2F_1\left (2,1-n;2-n;\frac {a \cos (c+d x)}{b+a \cos (c+d x)}\right )}{a (-1+n)}\right ) (a+b \sec (c+d x))^n}{12 a d (b+a \cos (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[c + d*x])^n*Sin[c + d*x]^3,x]

[Out]

(Cos[c + d*x]*((-2*(2*a - b*(-2 + n))*(b + a*Cos[c + d*x])^2)/a + 8*Cos[(c + d*x)/2]^2*(b + a*Cos[c + d*x])^2
- (2*b*(-6*a^2 + b^2*(2 - 3*n + n^2))*Hypergeometric2F1[2, 1 - n, 2 - n, (a*Cos[c + d*x])/(b + a*Cos[c + d*x])
])/(a*(-1 + n)))*(a + b*Sec[c + d*x])^n)/(12*a*d*(b + a*Cos[c + d*x]))

________________________________________________________________________________________

Maple [F]
time = 0.34, size = 0, normalized size = 0.00 \[\int \left (a +b \sec \left (d x +c \right )\right )^{n} \left (\sin ^{3}\left (d x +c \right )\right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(d*x+c))^n*sin(d*x+c)^3,x)

[Out]

int((a+b*sec(d*x+c))^n*sin(d*x+c)^3,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^n*sin(d*x+c)^3,x, algorithm="maxima")

[Out]

integrate((b*sec(d*x + c) + a)^n*sin(d*x + c)^3, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^n*sin(d*x+c)^3,x, algorithm="fricas")

[Out]

integral(-(cos(d*x + c)^2 - 1)*(b*sec(d*x + c) + a)^n*sin(d*x + c), x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))**n*sin(d*x+c)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^n*sin(d*x+c)^3,x, algorithm="giac")

[Out]

Exception raised: RuntimeError >> An error occurred running a Giac command:INPUT:sage2OUTPUT:Evaluation time:
0.45sym2poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Value

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\sin \left (c+d\,x\right )}^3\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^n \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)^3*(a + b/cos(c + d*x))^n,x)

[Out]

int(sin(c + d*x)^3*(a + b/cos(c + d*x))^n, x)

________________________________________________________________________________________